﻿<xsl:stylesheet version="1.0"
	xmlns:date="http://exslt.org/dates-and-times"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:ebe="http://cks/ebemethods"
  exclude-result-prefixes="date ebe">

  <xsl:param name="IsBlogOwner" />
  <xsl:param name="RelativeUrl" />

  <xsl:output omit-xml-declaration="yes" />

  <xsl:template match="/">

    <xsl:if test="$IsBlogOwner = 'True'">
      <ul>
        <xsl:apply-templates select="AdminLinks"/>
      </ul>
    </xsl:if>

    <xsl:if test="$IsBlogOwner != 'True'">
      <a>
        <xsl:attribute name="href">
          <xsl:value-of select="$RelativeUrl"/>/_layouts/authenticate.aspx?ReturnUrl=<xsl:value-of select="$RelativeUrl"/>
        </xsl:attribute>
        <xsl:value-of select="ebe:res('SignIn')"/>
      </a>
      <br/>
    </xsl:if>

  </xsl:template>

  <xsl:template match="AdminLinks">

    <h2>
      <xsl:value-of select="ebe:res('BlogAdmin')"/>
    </h2>
    <ul>
      <li>
        <a href="{@CreatePosts}">
          <xsl:value-of select="ebe:res('CreatePost')"/>
        </a>
      </li>
      <li>
        <a href="{@CreateCategories}">
          <xsl:value-of select="ebe:res('CreateCategory')"/>
        </a>
      </li>
      <li>
        <a href="{@Posts}">
          <xsl:value-of select="ebe:res('ManagePosts')"/>
        </a>
      </li>
      <li>
        <a href="{@Comments}">
          <xsl:value-of select="ebe:res('ManageComments')"/>
        </a>
      </li>
      <li>
        <a href="{@Categories}">
          <xsl:value-of select="ebe:res('ManageCategories')"/>
        </a>
      </li>
      <li>
        <a href="{@Links}">
          <xsl:value-of select="ebe:res('ManageLinks')"/>
        </a>
      </li>
      <li>
        <a href="{$RelativeUrl}/_layouts/cks/ebe/settings.aspx">
          <xsl:value-of select="ebe:res('BlogSettings')"/>
        </a>
      </li>
    </ul>

  </xsl:template>


</xsl:stylesheet>


<!--

	<ul class="linklist">
	<li><a href="http://andreasviklund.com">My website</a></li>
	<li><a href="http://andreasviklund.com/templates">Free website templates</a></li>
	<li><a href="http://openwebdesign.org">OpenWebDesign.org</a></li>
	<li><a href="http://oswd.org">OSWD.org</a></li>
	</ul>
-->